<template>
  <div class="header">
    <div class="header-left"><i class="iconfont">&#xe624;</i></div>
    <div class="header-input">
      <i class="iconfont">&#xe632;</i>
      请输入内容....
    </div>
    <router-link to="/city">
      <div class="header-right">
        {{ this.city }}
        <i class="iconfont arrow-icon">&#xe64a;</i>
      </div>
    </router-link>
  </div>
</template>

<script>
import { mapState } from 'vuex';
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city'])
  }
};
</script>

<style lang="stylus" scoped>
@import '../../../assets/styles/varibles.stylus'

.header
  display flex
  line-height 0.86rem
  background-color $bgColor
  color #fff
  .header-left
    width 0.64rem
    float left
    text-align center
  .header-input
    flex 1
    margin-left 0.2rem
    padding-left 0.15rem
    line-height 0.64rem
    height 0.64rem
    margin-top 0.12rem
    background-color #FFF
    border-radius 0.1rem
    color #CCCCCC
  .header-right
    min-width 1.04rem
    padding 0 0.1rem
    float right
    text-align center
    color #fff
    .arrow-icon
      font-size 0.2rem
</style>
